package com.yxb.option;

import com.alibaba.fastjson.annotation.JSONField;

import java.time.LocalDateTime;
import java.util.List;

public class DeviceInfoVo {

    /**
     * 消息ID
     */
    private Long id ;

    /**
     * SYNC包数据,列表形式
     */
    private List<DataPoint> datapoint;

    /**
     * 消息发生时间
     */
    @JSONField(format="yyyy-MM-dd HH:mm:ss.SSS")
    private LocalDateTime time;

    /**
     * 设备产品ID
     */
    private String  product_id;

    /**
     * 消息发送方ID
     */
    private Long from_id;

    /**
     * 消息状态
     */
    private String state;

    /**
     * 消息ID
     */
    private String msg_id ;

    /**
     * 消息类型
     */
    private String type;

    private String ip;

    /**
     * 1:设备往用户发送;2:用户往设备发送
     */
    private Integer flow_type ;

    /**
     * 透传的数据。统一用base64编码包裹
     */
    private String data;

    /**
     * 数据接收方ID
     */
    private String to_id ;


    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }


    public List<DataPoint> getDatapoint() {
        return datapoint;
    }

    public void setDatapoint(List<DataPoint> datapoint) {
        this.datapoint = datapoint;
    }

    public LocalDateTime getTime() {
        return time;
    }

    public void setTime(LocalDateTime time) {
        this.time = time;
    }

    public String getProduct_id() {
        return product_id;
    }

    public void setProduct_id(String product_id) {
        this.product_id = product_id;
    }

    public Long getFrom_id() {
        return from_id;
    }

    public void setFrom_id(Long from_id) {
        this.from_id = from_id;
    }

    public String getState() {
        return state;
    }

    public void setState(String state) {
        this.state = state;
    }

    public String getMsg_id() {
        return msg_id;
    }

    public void setMsg_id(String msg_id) {
        this.msg_id = msg_id;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getIp() {
        return ip;
    }

    public void setIp(String ip) {
        this.ip = ip;
    }

    public Integer getFlow_type() {
        return flow_type;
    }

    public void setFlow_type(Integer flow_type) {
        this.flow_type = flow_type;
    }

    public String getData() {
        return data;
    }

    public void setData(String data) {
        this.data = data;
    }

    public String getTo_id() {
        return to_id;
    }

    public void setTo_id(String to_id) {
        this.to_id = to_id;
    }

    @Override
    public String toString() {
        return "DeviceParamInfo{" +
                "id=" + id +
                ", datapoint=" + datapoint +
                ", time=" + time +
                ", product_id='" + product_id + '\'' +
                ", from_id=" + from_id +
                ", state='" + state + '\'' +
                ", msg_id='" + msg_id + '\'' +
                ", type='" + type + '\'' +
                ", ip='" + ip + '\'' +
                ", flow_type=" + flow_type +
                ", data='" + data + '\'' +
                ", to_id='" + to_id + '\'' +
                '}';
    }
}
